import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
export default new Vuex.Store({
    state: {
        selectPageIndex: 0,
        role: 'admin',
        token: '',
        navList: []
    },
    mutations: {
        // 存儲token
        SET_TOKEN: (state, token) => {
            state.token = token
        },
        //存储左侧导航树
        SET_NAV: (state, data) => {
            state.navList = data
        },
    },
    getters: {},
    actions: {}
})